home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel PPC / misc / bootstrap < prev    next >
Encoding:
Text File  |  1996-06-13  |  2.9 KB  |  104 lines  |  [TEXT/EDIT]

  1. # !/bin/csh
  2. # Boostrapping script.
  3. #
  4. # Usage : bootstrap [args_for_compile]
  5. #
  6. # For example to try a bootstrap on a small machine using gcc :
  7. #
  8. #                bootstrap -gcc -boost 
  9. #
  10. # For example to try a bootstrap on a big machine using cc :
  11. #
  12. #                bootstrap -cc -check_all
  13. #
  14. ###################################################################
  15. #set verbose=1
  16. cd ${SmallEiffel}/bin
  17. /bin/rm -f compile_to_c[1-3]
  18. echo "Compile compile command"
  19. set cmd="./compile -o compile.new $* COMPILE make"
  20. echo $cmd
  21. $cmd
  22. if (!(-f compile.new)) then
  23.     echo "Cannot Compile compile" 
  24.     exit 1
  25. else
  26.     mv -f compile.new compile
  27. endif
  28. ###################################################################
  29. echo "Try to compute compile_to_c1 with compile"
  30. set cmd="compile -c_code -o compile_to_c1 $* COMPILE_TO_C make"
  31. echo $cmd
  32. $cmd
  33. if (!(-f compile_to_c1)) then
  34.     echo "Bad bootstrap (cannot produce compile_to_c1)."
  35.       exit 1
  36. endif
  37. ###################################################################
  38. echo "Try to compute compile_to_c2 with compile_to_c1"
  39. /bin/rm -f compile_to_c.make
  40. set cmd="compile_to_c1 -o compile_to_c2 $* COMPILE_TO_C make"
  41. echo $cmd
  42. $cmd
  43. if (!(-f compile_to_c.make)) then
  44.     echo "Bad bootstrap (cannot produce compile_to_c.make)."
  45.       exit 1
  46. endif
  47. set verbose=1
  48. source compile_to_c.make
  49. unset verbose
  50. if (!(-f compile_to_c2)) then
  51.     echo "Bad bootstrap (cannot produce compile_to_c2)."
  52.       exit 1
  53. endif
  54. ###################################################################
  55. echo "Try to compute compile_to_c3 with compile_to_c2"
  56. /bin/rm -f compile_to_c.make
  57. set cmd="compile_to_c2 -o compile_to_c3 $* COMPILE_TO_C make"
  58. echo $cmd
  59. $cmd
  60. if (!(-f compile_to_c.make)) then
  61.     echo "Bad bootstrap (cannot produce compile_to_c.make)."
  62.       exit 1
  63. endif
  64. set verbose=1
  65. source compile_to_c.make
  66. unset verbose
  67. if (!(-f compile_to_c3)) then
  68.     echo "Bad bootstrap (cannot produce compile_to_c3)."
  69.       exit 1
  70. endif
  71. ###################################################################
  72. bdiff compile_to_c2 compile_to_c3 > /dev/null
  73. if ($status) then
  74.    echo "Bootstrap not correct (compile_to_c2/compile_to_c3)."
  75.    exit 1
  76. endif
  77. echo "Bootstrap correct."
  78. echo "compile_to_c2 seems to be a good one."
  79. #######################################
  80. echo "Basic test of the new version."
  81. mv -f compile_to_c compile_to_c.old
  82. mv -f compile_to_c2 compile_to_c
  83. echo "Compute misc/self_test in file 'self_test.out'."
  84. ${SmallEiffel}/misc/self_test >! self_test.out
  85. diff self_test.out ${SmallEiffel}/misc/self_test.good_output
  86. if ($status) then
  87.    mv -f compile_to_c.old compile_to_c
  88.    echo "Bad self_test."
  89.    exit 1
  90. endif
  91. /bin/rm -f compile_to_c.old 
  92. echo "Good Self Test."
  93. echo "Install New Version."
  94. cd ${SmallEiffel}/bin_c
  95. /bin/rm -f ${SmallEiffel}/bin_c/*
  96. cp ../bin/loadpath.se .
  97. foreach cmd (compile compile_to_c eval finder pretty)
  98.     ../bin/compile_to_c -o $cmd $cmd make -boost -O2
  99.     /bin/rm -f ${SmallEiffel}/bin/${cmd}.make
  100.     /bin/rm -f ${SmallEiffel}/bin/${cmd}.[hco]
  101. end
  102. /bin/rm -f loadpath.se
  103. echo "New Version Installed."
  104.